<!--横屏提示-->
<style type="text/x-less">
@import "../css/_modules.less";
#forhorview {
	display: none;
}
#forhorview {
	position: fixed;
	z-index: 1000;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	width: 100%;
	background: rgba(0,0,0,0.95);
	display: none;
	.box-align(center);
	.box-pack(center);
	p {
		font-size: 0.6rem;
		color: #ddd;
	}
	&.show {
		.box();
	}
}	
</style>
<div id="forhorview">
	<p>推荐使用竖屏浏览哦~</p>
</div>
<script type="text/javascript">
//初始化html  font-size
$("html").css("font-size", document.documentElement.clientWidth / 375 * 312.5 + "%");
window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize", function(e) {
	if(window.orientation == 90 || window.orientation == -90) {
		$("#forhorview").css("display", "-webkit-box"); //显示竖屏浏览提示框
	} else { //竖屏下恢复默认显示效果
		$("html").css("font-size", document.documentElement.clientWidth / 375 * 312.5 + "%");
		$("#forhorview").css("display", "none");
	}
}, false);
</script>